﻿Imports System.IO
Imports CSVReader.Logic
Imports NUnit.Framework

<TestFixture()> _
Public Class ReaderTest

    <Test()> _
    Public Sub Datei_kann_gelesen_werden()
        Dim SUT = New Reader
        Dim Path = My.Computer.FileSystem.CurrentDirectory & "\Testfolder\EmptyFile.csv"

        Dim Result = SUT.ReturnFileContent(Path)

        Assert.That(Result, [Is].EqualTo(""))
    End Sub

    <Test()> _
    Public Sub Inhalt_einer_CSVDatei_mit_Text_wird_korrekt_gelesen()
        Dim SUT = New Reader
        Dim Path = My.Computer.FileSystem.CurrentDirectory & "\Testfolder\Test.csv"

        Dim Result = SUT.ReturnFileContent(Path)

        Assert.That(Result, [Is].EqualTo("Name,Vorname,Straße" & Environment.NewLine & "Mustermann,Max,Musterstraße 1" & Environment.NewLine))
    End Sub

End Class